Skip to content

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Jul 6, 2024

The old (current) trait solver has a limitation that when a where clause in param-env must be normalized using the same where clause, then we get spurious errors in normalize_param_env_or_error. I don't think there's an issue tracking it, but it's the root cause for many of the "fixed-by-next-solver" labeled issues.

Specifically, these errors may occur when checking predicate entailment of the GAT that comes out of desugaring RPITITs. Since we use ObligationCauseCode::CompareImplItem for these predicates, we try calling item_name on an RPITIT which fails, since the RPITIT has no name.

We simply suppress this logic when we're reporting a predicate entailment error for an RPITIT. RPITITs should never have predicate entailment errors, by construction, but they may due to this bug in the old solver.

Addresses the ICE in #127331, though doesn't fix the underlying issue (which is fundamental to the old solver).

r? types

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 6, 2024
@oli-obk oli-obk closed this Jul 6, 2024
@oli-obk oli-obk reopened this Jul 6, 2024
@rust-log-analyzer

This comment has been minimized.

Copy link
Contributor

@oli-obk oli-obk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congradulences, you fixed an ICE 😆

r=me with crash test removed

@compiler-errors
Copy link
Member Author

yeah im just gonna delete the test since it's not particularly interesting

@compiler-errors compiler-errors force-pushed the rpitit-entailment-false-positive branch from 9cf41da to d6276b3 Compare July 6, 2024 19:20
@compiler-errors
Copy link
Member Author

@bors r=oli-obk rollup

@bors
Copy link
Collaborator

bors commented Jul 6, 2024

📌 Commit d6276b3 has been approved by oli-obk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 6, 2024
@bors
Copy link
Collaborator

bors commented Jul 7, 2024

⌛ Testing commit d6276b3 with merge 9e27377...

@bors
Copy link
Collaborator

bors commented Jul 7, 2024

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 9e27377 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 7, 2024
@bors bors merged commit 9e27377 into rust-lang:master Jul 7, 2024
@rustbot rustbot added this to the 1.81.0 milestone Jul 7, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (9e27377): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.4% [0.4%, 0.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.4% [-0.4%, -0.4%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary -1.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.2% [-1.8%, -0.5%] 5
All ❌✅ (primary) - - 0

Cycles

Results (secondary -0.5%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.5% [-0.5%, -0.4%] 2
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 699.359s -> 699.372s (0.00%)
Artifact size: 328.42 MiB -> 328.43 MiB (0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants